<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="/common/jsp/taglibs-nojs-nocss.jsp"%>
<%@include file="/common/jsp/cssAndScript.jsp"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort()+ path + "/";
%>
<div id="pop_up_content">
	<div class="pop_up_title images_1">
		新建权限
	</div>
	<div class="pop_up_body">
		<form id="rescAddAction" action="userManager/addResc.action" method="post" >
		<table border="0" cellpadding="0" cellspacing="0"  width="400">
			<tr>
				<td>
					<div class="form_input_value">
						资源名称
					</div>
				</td>
				<td>
					<input  type="hidden" name="resc.id" value="<s:property value='resc.id'/>" >
					<input  type="text" name="resc.name" value="<s:property value='resc.name'/>" class="dialogy_input max_length:100 required">
				</td>
			</tr>
			<tr>
				<td>
					<div class="form_input_value">
						资源中文名称
					</div>
				</td>
				<td>
						<input type="text" id="cname" name="resc.cname" value="<s:property value='resc.cname'/>" class="dialogy_input max_length:15 required" >
					</td>
			</tr>
				<tr>
				<td>
					<div class="form_input_value">
						资源路径信息
					</div>
				</td>
				<td>
						<input type="text" id="string" class="dialogy_input required" name="resc.string" value="<s:property value='resc.string'/>">
					</td>
			</tr>
			<tr>
				<td>
					<div class="form_input_value">
						资源描述
					</div>
				</td>
				<td>
					<s:select id="u_roleList" list="#{'REJECT':'排除页面','URL':'控制页面'}" name="resc.type" headerKey="" headerValue="请选择" value="resc.type" theme="simple" cssClass="required"/>
				</td>
			</tr>
			<tr>
				<td>
					<div class="form_input_value">
						资源描述
					</div>
				</td>
				<td>
					<input type="text" id="memo" class="dialogy_input required" name="resc.memo" value="<s:property value='resc.memo'/>">
				</td>
			</tr>
			<tr>
				<td>
					<div class="form_input_value">
						树形节点
					</div>
				</td>
				<td>
					<input type="text" id="tree" class="dialogy_input required" name="resc.tree" value="<s:property value='resc.tree'/>">
				</td>
			</tr>
			<tr>
				<td></td>
				<td>
					<input id="editSubmit" type="button" value="确定" class="btn" onmouseout="this.className='btn'" onmousedown="this.className='btn1'" onmouseover="this.className='btn2'">
					<input type="button" value="取消" class="btn" onclick="hideDialog();" onmouseout="this.className='btn'" onmousedown="this.className='btn1'" onmouseover="this.className='btn2'">
				</td>
			</tr>
		</table>
		</form>
	</div>
</div>
<script type="text/javascript">
/* 表单提交 */
i.formSubmit("editSubmit",	//绑定的按钮id
				  "rescAddAction" ,   //提交的表单id
				  function(result){
					  	var jsonMsgObj=new JsonMsgObj(result);
						var  msg=jsonMsgObj.getMessage();
					    var codeId=jsonMsgObj.getCodeid();
						var isOk=jsonMsgObj.getIsok();
						if( isOk ){
						    aerouiAlert(msg);
							hideDialog();// 隐藏窗口
							loadContentLink('<%=basePath %>userManager/getAllResc.action');
						}else{		// 如果编辑失败了
						  JsManageInfoHandleException( result , function(msg , codeId , isOk){
						  		hideDialog();// 隐藏窗口
						   });
					   }
					});
</script>
